import { reactive, watch } from 'vue';

export default function importConfig() {
  const base = reactive({
    visible: false,
    size: 'medium',
    columns: [
      {
        title: '供应商名称',
        dataIndex: 'MA001',
        checked: true,
      },
      {
        title: '用户名',
        dataIndex: 'MA002',
        checked: true,
      },
      {
        title: '创建日期',
        dataIndex: 'MA003',
        checked: true,
      },
      {
        title: '最后登录时间',
        dataIndex: 'MA011',
        checked: true,
      },
      {
        title: '状态',
        dataIndex: 'MA011',
        checked: true,
      },
      {
        title: '操作',
        slotName: 'option',
        checked: true,
      },
    ],
    config: ['add'],
  });

  const data = [
    {
      COMPANY: 'COMPANY',
      CREATOR: 'CREATOR',
      MA001: 'MA001',
      MA002: 'MA002',
      MA003: 'MA003',
      MA011: '启动',
      MA012: 'MA012',
      MA013: 'MA013',
    },
    {
      COMPANY: 'COMPANY',
      CREATOR: 'CREATOR',
      MA001: 'MA001',
      MA002: 'MA002',
      MA003: 'MA003',
      MA011: '关闭',
      MA012: 'MA012',
      MA013: 'MA013',
    },
    {
      COMPANY: 'COMPANY',
      CREATOR: 'CREATOR',
      MA001: 'MA001',
      MA002: 'MA002',
      MA003: 'MA003',
      MA011: '启动',
      MA012: 'MA012',
      MA013: 'MA013',
    },
  ];

  /**
   * @exports tapNew 点击事件
   */
  const tapNew = () => {
    base.visible = true;
  };

  return {
    base,
    data,
    tapNew,
  };
}
